1. Field of the Invention
The present invention relates to an image processing method and a system thereof. More particularly, the present invention relates to a method for compensating pixel values of defective pixels in an image by embedding the location information of the defective pixels in the image and an image processing system using the same.
2. Description of Related Art
Generally, when capturing an image with a digital still camera (DSC), noise is always produced in the image by dark current even though no light enters the image sensor. This is because an electronic photo-sensitive device has to work with power supply which inevitably generates heat, and “heat” is the main factor for the production of dark current which causes the electronic photo-sensitive device to produce noise. To resolve this problem, usually a normal image is captured with the DSC first, and a dark image is then captured with similar exposure condition after the shutter of the DSC is closed. The noise caused by dark current can be eliminated by subtracting the dark image from the normal image.
Besides the foregoing problem of dark current, not all the image sensing pixel units can work properly due to the yield design of the image sensor in today's DSC system. Wherein defective image sensing pixel units may cause incorrect pixel values of the corresponding pixels in the image, which may further affect the display quality of the image. Those pixels having incorrect pixel values are referred to as defective pixels. Generally speaking, defective pixels exist more or less in the photo-sensitive device of any DSC; however, such a photo-sensitive device can be compensated for the pixel values of defective pixels within an acceptable range through an image processing mechanism in the DSC, so as to resolve the problem of bad display quality caused by the defective pixels.
According to a conventional method for compensating pixel values of defective pixels, the neighboring pixels of the defective pixels (usually pixels on the left and right sides or all around the defective pixels) are located through a location information of the defective pixels, and the average pixel values of these neighboring pixels are used for replacing the pixel values of the defective pixels. The location information of the defective pixels is usually obtained through testing before the DSC leaves the factory and is recorded in a memory in the DSC. Later on, when every time an image is captured, an image signal processor in the DSC reads the location information of the defective pixels from the memory to compensate the pixel values of these defective pixels.
However, according to the method described above, the pixel information of the image and the location information of the defective pixels have to be read from the memory every time when a pixel is processed. Moreover, these two information are respectively stored in two different storage spaces in the memory; thus, the two different storage spaces have to be accessed at the same time, accordingly the access bandwidth of the memory is increased.